<?php

/**
 *
 * Bullet Proof Interfaces Declaration
 * 
 * @author		David ansermot <david@ansermot.ch>
 * @date		2009-09-01
 * @version		1.0.0
 * @package		bplib
 * @subpackage	bplib_v1_0_0
 * @copyright	(C)2009 David Ansermot
 * @file		interfaces.php
 *
 **********************************************************************
 
	This file is part of Bullet Proof Lib.

    Foobar is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Foobar is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Foobar.  If not, see <http://www.gnu.org/licenses/>.      
	       
 **********************************************************************
 *                                                                   
 */

// Interface for static class
interface IBpStatic {
	
	public static function debug();

}

// Interface for objects
interface IBpObject {
	
	public function debug();
	public function kill();
	
}

// Interface for database packages
interface IBpDatabase {
	
	public function selectDatabase($db);
	public function open($host, $user, $pass);
	public function close($link = null);
	public function query($query);
	public function querySelect($fields, $table, $where = '', $order = 'ASC', $limit = '', $additionnal = '');
	public function queryInsert($fields, $table, $values, $additionnal = '');
	public function queryUpdate($fields, $table, $where, $additionnal = '');
	public function queryDelete($table, $where, $additionnal);
	public function fetch($res);
	public function getErrors();
	public function getLastError();
	public function hasError();
	public function cleanErrors();
	public function setAutoCleanErrors($flag = true);

}

// Interface for "Singleton Design Pattern",
interface ISingleton {
	
	//private function __clone();
	//private function __construct();
	
	public static function &getInstance();
	
}

?>